{% if jenkins_job_list %}
    <table class="table table-striped table-hover table-condensed">
        <thead>
        <th>Jenkins 任务名称</th>
        <th>最后一次成功构建版本号</th>
        <th>操作</th>
        </thead>
        <tbody>
        {% for job in jenkins_job_list %}
            <tr>
                <td>
                    {{ job.name }}
                </td>
                <td>
                    {{ job.last_success_num }}
                </td>
                <td>
                    <a href="javascript:void(0);"
                       onclick="UpdateLastSuccessBuildNum('{{ job.id }}', '{{ pagenumber }}')"
                       type="button" class="btn btn-success">更新最后一次成功构建版本号</a>
                    <a href="javascript:void(0);" onclick="Build('{{ job.id }}', '{{ pagenumber }}')"
                       type="button" class="btn btn-success">构建</a>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
{% else %}
    <p>No Jenkins Jobs are available.</p>
{% endif %}